\(\int \frac {1}{1-2 \coth ^2(x)} \, dx\) [9]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 19 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=-x+\sqrt {2} \text {arctanh}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \]

[Out]

-x+arctanh(1/2*2^(1/2)*tanh(x))*2^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3741, 3756, 212} \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=\sqrt {2} \text {arctanh}\left (\frac {\tanh (x)}{\sqrt {2}}\right )-x \]

[In]

Int[(1 - 2*Coth[x]^2)^(-1),x]

[Out]

-x + Sqrt[2]*ArcTanh[Tanh[x]/Sqrt[2]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3741

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> Simp[x/(a - b), x] - Dist[b/(a - b), Int[Sec[e
 + f*x]^2/(a + b*Tan[e + f*x]^2), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a, b]

Rule 3756

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps \begin{align*} \text {integral}& = -x-2 \int \frac {\text {csch}^2(x)}{1-2 \coth ^2(x)} \, dx \\ & = -x+2 \text {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\coth (x)\right ) \\ & = -x+\sqrt {2} \text {arctanh}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=-x+\sqrt {2} \text {arctanh}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \]

[In]

Integrate[(1 - 2*Coth[x]^2)^(-1),x]

[Out]

-x + Sqrt[2]*ArcTanh[Tanh[x]/Sqrt[2]]

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.42

method result size
derivativedivides \(-\frac {\ln \left (1+\coth \left (x \right )\right )}{2}+\frac {\ln \left (\coth \left (x \right )-1\right )}{2}+\sqrt {2}\, \operatorname {arctanh}\left (\coth \left (x \right ) \sqrt {2}\right )\) \(27\)
default \(-\frac {\ln \left (1+\coth \left (x \right )\right )}{2}+\frac {\ln \left (\coth \left (x \right )-1\right )}{2}+\sqrt {2}\, \operatorname {arctanh}\left (\coth \left (x \right ) \sqrt {2}\right )\) \(27\)
risch \(-x +\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3-2 \sqrt {2}\right )}{2}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3+2 \sqrt {2}\right )}{2}\) \(39\)

[In]

int(1/(1-2*coth(x)^2),x,method=_RETURNVERBOSE)

[Out]

-1/2*ln(1+coth(x))+1/2*ln(coth(x)-1)+2^(1/2)*arctanh(coth(x)*2^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (16) = 32\).

Time = 0.27 (sec) , antiderivative size = 70, normalized size of antiderivative = 3.68 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (-\frac {3 \, {\left (2 \, \sqrt {2} - 3\right )} \cosh \left (x\right )^{2} - 4 \, {\left (3 \, \sqrt {2} - 4\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, {\left (2 \, \sqrt {2} - 3\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {2} - 3}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} + 3}\right ) - x \]

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log(-(3*(2*sqrt(2) - 3)*cosh(x)^2 - 4*(3*sqrt(2) - 4)*cosh(x)*sinh(x) + 3*(2*sqrt(2) - 3)*sinh(x)^
2 + 2*sqrt(2) - 3)/(cosh(x)^2 + sinh(x)^2 + 3)) - x

Sympy [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.79 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=- x - \frac {\sqrt {2} \log {\left (\tanh {\left (x \right )} - \sqrt {2} \right )}}{2} + \frac {\sqrt {2} \log {\left (\tanh {\left (x \right )} + \sqrt {2} \right )}}{2} \]

[In]

integrate(1/(1-2*coth(x)**2),x)

[Out]

-x - sqrt(2)*log(tanh(x) - sqrt(2))/2 + sqrt(2)*log(tanh(x) + sqrt(2))/2

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (16) = 32\).

Time = 0.28 (sec) , antiderivative size = 38, normalized size of antiderivative = 2.00 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=-\frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (-2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (-2 \, x\right )} + 3}\right ) - x \]

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="maxima")

[Out]

-1/2*sqrt(2)*log(-(2*sqrt(2) - e^(-2*x) - 3)/(2*sqrt(2) + e^(-2*x) + 3)) - x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (16) = 32\).

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 2.00 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (2 \, x\right )} + 3}\right ) - x \]

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(-(2*sqrt(2) - e^(2*x) - 3)/(2*sqrt(2) + e^(2*x) + 3)) - x

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.79 \[ \int \frac {1}{1-2 \coth ^2(x)} \, dx=\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\mathrm {coth}\left (x\right )\right )-x \]

[In]

int(-1/(2*coth(x)^2 - 1),x)

[Out]

2^(1/2)*atanh(2^(1/2)*coth(x)) - x